#include <iostream>
#include <string>
#include "TcpServer.hpp"
#include <memory>

void Usage(const char *proc)
{
    std::cout << proc << ":port" << std::endl;
}

int main(int argc, char *argv[])
{
    if (argc != 2)
    {
        Usage(argv[0]);
        exit(-1);
    }
    int port = atoi(argv[1]);
    std::unique_ptr<TcpServer> svr = std::make_unique<TcpServer>(port);
    svr->Init();
    svr->Start();
    return 0;
}